package ${packageName}.${moduleName}.service;


import ${packageName}.base.bean.pojo.Page;
import ${packageName}.base.bean.pojo.PageResultBO;
import ${packageName}.${moduleName}.dao.${className}Mapper;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ${packageName}.${moduleName}.bean.pojo.${className};

import java.util.List;


@Service
public class ${className}Service implements I${className}Service{
	@Autowired
	private ${className}Mapper ${lowClassName}Mapper;


	@Override
	public ${className} getById(${firstColType} ${firstParam}) {
		return ${lowClassName}Mapper.getById(${firstParam});
	}

	@Override
	public List<${className}> listAll(){
		return ${lowClassName}Mapper.listAll();
	}

	@Override
	public PageResultBO<${className}> listByPage(Page page) {
		return ${lowClassName}Mapper.listByPage(page);
	}

	@Override
	public boolean add(${className} ${lowClassName}) {
		return ${lowClassName}Mapper.add(${lowClassName}) == 1;
	}

	@Override
	public boolean delete(${firstColType} ${firstParam}) {
		return ${lowClassName}Mapper.delete(${firstParam}) == 1;
	}

	@Override
	public boolean update(${className} ${lowClassName}) {
		return ${lowClassName}Mapper.update(${lowClassName}) == 1;
	}
}
